<template>
		<view class="noData" :style="{ 'top': top }" @click="toAdd">
				<i class="iconfont" v-if="isIndex">&#xe658;</i>
				<image v-else src="../static/images/noData.png" mode="widthFix"></image>
				<text>{{text}}</text>
			</view>
	
</template>

<script>
export default {
	name: 'navTab',
	props: {
		isIndex: {
			type: Boolean,
			default: false
		},
		top: {
			type: String,
			default: '50%'
		},
		text: {
			type: String,
			default: '暂无数据'
		}
	},
	data() {
		return {};
	},
	created() {},
	methods: {
		toAdd(){
			if(this.isIndex){
				this.$emit('showreleaseDia')
			}
		}
	}
};
</script>

<style lang="scss">
.noData {
	position: absolute;
	left: 50%;
	transform: translate(-50%, -50%);
	text-align: center;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	.iconfont{
		font-size: 100rpx;
		margin-bottom: 30rpx;
	}
}

.noData image {
	width: 150rpx;
	margin: 0 auto;
	display: block;
	margin-bottom: 20rpx;
	height: 100rpx;
}

.noData text {
	text-align: center;
	font-size: 14px;
	color: #666;
}
</style>
